<?php
	require('news.doc.php');
	//新闻详情
	$app->get(
		'/news/detail',
		function() use($app, $db2){
			$data = $app->request()->get();
			$echo['error'] = "";
			if($data && isset($data['newsid'])){
				$news=$db2->select(1,'tb_news','*',array('tbid'=>$data['newsid']));
				$echo['content']=$news['content'];
			}else{
				$echo['error'] = "数据缺失，请检查";
			}
			echo json_encode($echo);
		}
	);
?>